<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>作业1</title>
    <style>
        *{margin: 10px;padding: 10px;}
        div{width: 100px;height: 100px;}
        #div1{background-color: plum}
    </style>
    <script>
        window.onload=function() {
            document.getElementById("div1").addEventListener("click", function () {
                this.style.width = 200 + 'px';
                this.style.height = 200 + 'px';
            });
            document.getElementById("div1").addEventListener("mouseout", function () {
                this.style.width = 100 + 'px';
                this.style.height = 100 + 'px';
            });
        }
    </script>
</head>
<body>
<div id="div1"></div>
</body>
</html>